*************************************************************************
************************Figure 7: LABOR MARKET ************************
*************************************************************************

grstyle init
grstyle set plain
grstyle set color tableau

cd $PATH


* 1) Labor demand: by occupation
* Download CEIC Data series:
* CN: City Labor Market: Demand: Person in Charge
* CN: City Labor Market: Demand: Technical Professional
* CN: City Labor Market: Demand: Clerical Staff & Related
* CN: City Labor Market: Demand: Service & Attendant
* CN: City Labor Market: Demand: Agricultural Personnel
* CN: City Labor Market: Demand: Equipment Operator
* Merge datasets above and generate laborbyoccupation.dta

use laborbyoccupation.dta, clear

g month=mofd(time)
format month %tm


twoway (line equipmentop month, lc("`r(p5)'") ) (line Clericalstaff month, lc("`r(p2)'")) ///
	   (line technicalprofessional month, lc("`r(p3)'")) (line Personincharge month, lc("`r(p4)'")), ///
	   legend(symxsize(5) label(1 "Equipment operator")  label(2 "Clericall staff")  ///
	   label(3 "Technical professional") label(4 "Supervisors")  ///
       region(lwidth(none)) size(small) pos(6) cols(4)) ytitle("Person th")

graph export fig7_labor_occu.eps, replace


* 2) labor demand: by sector
* Download CEIC Data series:
* CN: City Labor Market: Demand: Manufacturing
* CN: City Labor Market: Demand: Ele, Gas & Water Prodn & Supply
* Merge datasets above and generate laborindustry.dta

use laborbysector.dta, clear
g time=mofd(month)
format time %tm

twoway (line manufacturing time) (line electricity time), ///
		legend(order(1 "Manufacturing" 2 "Electricity, Gas & Water Producty and Supply")  ///
		region(lwidth(none)) pos(6) size(small)) ///
		ytitle("Person th", size(small)) xtitle("")

graph export fig7_labor_demand.eps, replace

* 3) number of employees: by sector
* CEIC Data series:
* CN: No of Employee: State Owned: Manufacturing
* CN: No of Employee: State Owned: Electricity, Gas & Water Production and Supply
* CN: No of Employee: Private & Individual: Manufacturing
* Merge datasets above and generate laborbysector.dta

use laborbysector_number.dta, clear

twoway (line ManufacturingSOE ManufacturingPrivate Year, ytitle("Manufacturing (mn persons)", axis(1)))  ///
	   (line ElectricitySOE Year, yaxis(2) ytitle("Electricity (mn persons)", axis(2))),  ///
	   legend(pos(6) cols(3) symxsize(8) size(small) region(lwidth(none)))

graph export fig7_labor_number.eps, replace
